<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
  <head>
    <title>
    </title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <link rel="stylesheet" href="css/ui-btn.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-color.css">
    <link rel="stylesheet" href="css/ui-res.css">
    <style>
        input{
            color: black;
            padding: 1px 6px;
            margin-left:6px;
        }
        input[type="text"]{
            padding: .2em .4em;
            margin:.4em .6em;
            font-size:1em;
        }
        input[type="button"]{
            padding: .6em .8em;
            margin:.4em .6em;
            font-size:1.2em;
        }
    </style>
    <script src="js/zy_control.js">
    </script>
    <script src="js/main.js">
    </script>
    <script type="text/javascript">
        window.uexOnload = function(type){
            uexWindow.subscribeChannelNotification("1", "easemobDemoGlobalPost");
            uexWindow.easemobDemoGlobalPost=globalPost;
        }
    //[4.6]
    function getContactUserNames(){
        uexEasemob.getContactUserNames('');
    }
    
    //[4.8]
    function addContact(){
        var toAddUsername = document.getElementById("addContacttoAddUsername").value;
        var reason = document.getElementById("addContactreason").value;
        uexEasemob.addContact('{"toAddUsername":"'+toAddUsername+'","reason":"'+reason+'"}');3

    }
    
    //[4.9]
    function deleteContact(){
        var username = document.getElementById("deleteContactusername").value;
        uexEasemob.deleteContact('{"username":"'+username+'"}');
    }
    
    //[4.10]
    function acceptInvitation(){
        var username = document.getElementById("acceptInvitationusername").value;
        uexEasemob.acceptInvitation('{"username":"'+username+'"}');
    }
    
    //[4.11]
    function refuseInvitation(){
        var username = document.getElementById("refuseInvitationusername").value;
        var reason = document.getElementById("refuseInvitationreason").value;
        uexEasemob.refuseInvitation('{"username":"'+username+'","reason":"'+reason+'"}');
    }
    
    //[4.12]
    function getBlackListUsernames(){
        uexEasemob.getBlackListUsernames('');
    }
    
    //[4.14]
    function addUserToBlackList(){
        var username = document.getElementById("addUserToBlackListusername").value;
        uexEasemob.addUserToBlackList('{"username":"'+username+'"}');
    }
    
    //[4.15]
    function deleteUserFromBlackList(){
        var username = document.getElementById("deleteUserFromBlackListusername").value;
        uexEasemob.deleteUserFromBlackList('{"username":"'+username+'"}');
    }





       </script>
</head>
<body class="um-vp " ontouchstart>
    <div id="page_0" class="up ub ub-ver" tabindex="0">
            <!--header开始-->
            <div id="header" class="uh t-wh ub" style="background: #27A73F;">
                <div class="umw4 ub ub-ac ub-pc" ontouchstart="zy_touch()" onclick="closeWin()">
                    <div ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-blu c-m1 uc-a t-wh" style="background: -webkit-gradient(linear,0 0,0 100%,from(#FFCD00),color-stop(50%,#FFBC00),color-stop(50%,orange));border: 1px solid #FFA700;-webkit-border-radius: 8px;  text-align: center;color: #712000;  display: block; font-size: 1em; padding: 0.2em;">返回</div>
                </div>
                <h1 class="ut ub-f1 ulev0 ut-s tx-c" tabindex="0">Friend</h1>
                <div class="umw4" ontouchstart="zy_touch()" onclick="">
                <!--插入按钮控件-->
                </div>
     </div>
     <!--header结束--><!--content开始-->
     <div id="content" class="ub-f1 tx-l t-bla" style="">
         
     <div class="conbor">
        <div class="consj" id="topDiv">
            <div id='globalPostArea'>全局广播显示区域</div><br><br>
            
            
             <div> </div><div>======Friend==========</div>
             <div> </div><span>getContactUserNames</span>
             <input class='btn' type='button' value='调用接口' onclick='getContactUserNames()'></input>
             
             <div> </div><span>addContact</span>
             <div>toAddUsername:</div><input class="textbox" type="text" id="addContacttoAddUsername" value="appcanuser2"></input>
             <div>reason:</div><input class="textbox" type="text" id="addContactreason" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='addContact()'></input>
             
             <div> </div><span>deleteContact</span>
             <div>username:</div><input class="textbox" type="text" id="deleteContactusername" value="appcanuser2"></input>
             <input class='btn' type='button' value='调用接口' onclick='deleteContact()'></input>
             
             <div> </div><span>acceptInvitation</span>
             <div>username:</div><input class="textbox" type="text" id="acceptInvitationusername" value="appcanuser2"></input>
             <input class='btn' type='button' value='调用接口' onclick='acceptInvitation()'></input>
             
             <div> </div><span>refuseInvitation</span>
             <div>username:</div><input class="textbox" type="text" id="refuseInvitationusername" value="appcanuser2"></input>
             <div>reason:</div><input class="textbox" type="text" id="refuseInvitationreason" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='refuseInvitation()'></input>
             
             <div> </div><span>getBlackListUsernames</span>
             <input class='btn' type='button' value='调用接口' onclick='getBlackListUsernames()'></input>
             
             <div> </div><span>addUserToBlackList</span>
             <div>username:</div><input class="textbox" type="text" id="addUserToBlackListusername" value="appcanuser2"></input>
             <input class='btn' type='button' value='调用接口' onclick='addUserToBlackList()'></input>
             
             <div> </div><span>deleteUserFromBlackList</span>
             <div>username:</div><input class="textbox" type="text" id="deleteUserFromBlackListusername" value="appcanuser2"></input>
             <input class='btn' type='button' value='调用接口' onclick='deleteUserFromBlackList()'></input>
        <div>======回调记录==========</div>
        <div id='TestCallBack'>原本内容</div>
        <div id='TestData'>原本内容</div>
        
    </div>
    </div>
</body>
<script>

</script>
</html>
